import request from '@/config/axios'

import { BaseModel } from '@/api/common/baseModel'

/**
 * 商品品牌
 */
export type Model = BaseModel

// 查询列表支付订单
export const getPage = async (params: BaseModel) => {
    return await request.get({
        url: import.meta.env.VITE_BASE_ROLE + '/userCenter/tradeOrder/buyer/buyer/page.json',
        params
    })
}

// 更新商品品牌
export const update = (data: Model) => {
    return request.put({
        url: import.meta.env.VITE_BASE_ROLE + '/userCenter/tradeOrder/buyer/buyer/update.json',
        data
    })
}

// 删除商品品牌
export const del = (id: string) => {
    return request.delete({ url: import.meta.env.VITE_BASE_ROLE + `/userCenter/tradeOrder/buyer/buyer/del.json?id=${id}` })
}

// 获得商品品牌
export const getById = (id: string) => {
    return request.get({ url: import.meta.env.VITE_BASE_ROLE + `/userCenter/tradeOrder/buyer/buyer/getById.json?id=${id}` })
}
